#include<stdio.h>
int main(void)
{
	int length,width;
	int perimeter,area;
	
	scanf("%d,%d",&length,&width);
	perimeter=2*(length+width);
	area=length*width;
	
	printf("perieter=%d,area=%d",perimeter,area);
	
	return 0;
	getchar();
}
